local que_jinmie = fk.CreateSkill {
    name = "que_jinmie",
    anim_type = "control",
    tags = { Skill.Limited },
}
Fk:loadTranslationTable {
    ["que_jinmie"] = "烬灭",
    [":que_jinmie"] = "限定技，出牌阶段，你可以令至多三名其他角色随机弃置共计X张牌，然后各受到与其弃牌数相等的伤害(X为本局游戏累计获得的“薪火”，若仅选择一名角色，X最大为3)。",
    ["#que_jinmie"] = "烬灭：你可以选择至多三名其他角色，共计弃%arg牌并受到伤害。",

    ["$que_jinmie1"] = " ",
    ["$que_jinmie2"] = " ",
}
que_jinmie:addEffect("active", {
    name = "que_jinmie",
    anim_type = "control",
    card_num = 0,
    min_target_num = 1,
    max_target_num = 3,
    prompt = function(self, player)
        return "#que_jinmie:::" .. player:getMark("bmw_xinhuo")
    end,
    target_filter = function(self, player, to_select, selected, selected_cards)
        return to_select ~= player
    end,
    can_use = function(self, player)
        return player:usedSkillTimes(que_jinmie.name, Player.HistoryGame) == 0 and player:getMark("bmw_xinhuo") > 0
    end,
    card_filter = Util.FalseFunc,
    on_use = function(self, room, effect)
        local player = effect.from
        local targets = table.simpleClone(effect.tos)
        room:sortByAction(targets) --排序目标
        local n
        if #targets > 1 then
            n = player:getMark("bmw_xinhuo")
        else
            n = math.min(3, player:getMark("bmw_xinhuo"))
        end
        for _ = 1, n, 1 do
            local id = table.random(targets)
            if not id.dead and not id:isNude() then
                local ids = table.random(id:getCardIds { Player.Hand, Player.Equip })
                room:throwCard(ids, self.name, id, player)
                room:addPlayerMark(id, "que_jinmie-turn")
            end
        end
        for _, id in ipairs(room:getOtherPlayers(player)) do
            if id:getMark("que_jinmie-turn") > 0 then
                room:damage {
                    from = player,
                    to = id,
                    damage = id:getMark("que_jinmie-turn"),
                    skillName = self.name,
                }
            end
        end
    end,
})
return que_jinmie
